package org.hotelsystem.hoteladminsystem.Controller;

import org.hotelsystem.hoteladminsystem.Service.RoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/room")
public class RoomController {

    @Autowired
    private RoomService roomService;

    @GetMapping("/getRoomById")
    public Map<String, Object> getRoomById(@RequestParam(value = "id", required = true) int id) {
        return roomService.getHotelRooms(id);
    }
}
